﻿using OnlineQC.CommomControl;
using OnlineQC.CommomControl.CommonForms;
using OnlineQC.PageUserControls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace OnlineQC
{
    public partial class MainFrm : FrmBase
    {
        public MainFrm()
        {
            InitializeComponent();
            Global.mainFrm = this;
        }
        private void MainFrm_Load(object sender, EventArgs e)
        {
            aCESetting_Click(null, null);
        }
        private bool ShowPage(ucBaseControl ucControl)
        {
            try
            {
                ucControl.Dock= DockStyle.Fill;

                MainPanel.Controls.Clear();
                MainPanel.Controls.Add(ucControl);
                return true;
            }
            catch (Exception ex)
            {
                FrmShowHelper.ShowMessage(ex.Message);
                return false;
            }
            
        }
        /// <summary>
        /// 设置参数
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void aCESetting_Click(object sender, EventArgs e)
        {
            SettedUserControl settedUserControl = new SettedUserControl();
            if (ShowPage(settedUserControl))
            { 
                
            }
            

        }
        /// <summary>
        /// 被动模式一对一
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void aCEPassiveModeOne_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// 主动模式一对多
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void aCEActiveModelOne_Click(object sender, EventArgs e)
        {

        }

        
    }
}
